<template>
  <div>
    <!-- <TopWrap></TopWrap> -->
    <div class="order_box clearfix">
      <div class="order_header"><h1>我的订单</h1>
        <button class="button" @click="openLocation">收获地址</button></div>
        <MyLocation v-show="LocationFlag" v-model="LocationFlag"></MyLocation>
      <!-- 我的订单 -->
      <div class="order_body">
        <div class="order_body_select">
          <ul>
            <li class="active">全部订单</li>
            <li>代付款</li>
            <li>待收获</li>
          </ul>
        </div>

        <div class="order_all">
          <form action="">
            <div class="order_all_search">
              <input
                type="text"
                placeholder="输入商品标题或订单号进行搜索"
                class="search_text"
              />
              <button type="submit" class="search_button">订单搜索</button>
            </div>
          </form>

          <div class="order_all_body">
            <div class="no_message" style="display: none">暂无信息</div>
            <table class="order_all_list">
              <thead>
                <tr>
                  <th>商品</th>
                  <th>价格</th>
                  <th>实付款</th>
                  <th>交易状态</th>
                  <th>交易操作</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>
                    <div class="shangping-box">
                      <div class="shangping">
                        <a href="">
                          <img src="@/assets/upload/1.jpg" alt="" />
                          <h4 class="detail">
                            中文打字机：一个世纪的汉字突围史中文打字机：
                            一个世纪的汉字突围史中文打字机：一个世纪的汉字突围史
                          </h4>
                        </a>
                      </div>
                    </div>
                  </td>
                  <td>¥20</td>
                  <td>20</td>
                  <td>已支付</td>
                  <td>评价</td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>

        <!-- 页面 -->
        <div class="order_page">
          <button class="order_page_pre">&lt;</button>
          <span class="order_page_pagelist">1</span>
          <button class="order_page_next">&gt;</button>
        </div>

        <div class="ing-order">
          <div class="no_message">暂无信息</div>
        </div>
        <div class="ed-order">
          <div class="no_message">暂无信息</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import MyLocation from '@/components/MyLocation'
export default {
  name: 'MyOrder',
  data () {
    return {
      LocationFlag: false
    }
  },
  methods: {
    openLocation () {
      this.LocationFlag = true
    }
  },
  components: {
    MyLocation
  }
}
</script>

<style scoped>
/* 清除浮动 */
.clearfix:after {
  content: "";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}
.clearfix {
  /*IE6、7 专有 */
  *zoom: 1;
}
.order_box {
  position: relative;
  width: 1100px;
  height: 580px;
  margin: 45px auto;
  background-color: white;
  border-radius: 20px;
}
.order_header {
  border-bottom: 1px solid #dcdcdc;
  height: 60px;
  line-height: 60px;
  font-size: 18px;
  margin-top: 15px;
  padding-left: 45px;
}
.order_header h1 {
  position: absolute;
  top: 0;
  left: 0;
  height: 60px;
  line-height: 60px;
  font-size: 18px;
  font-weight: 400;
  padding-left: 45px;
  /* background-color: antiquewhite; */
}
.order_header .button {
  position: absolute;
  top: 8px;
  right: 72px;
  width: 90px;
  height: 45px;
  line-height: 45px;
  color: black;
  font-weight: 700;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  background-color: #e8e8e8;
  transition: 0.3s;
}
.order_header .button:hover{background-color: #a8a8a8;}
.order_body {
  position: relative;
  height: 520px;
}

.order_body_select {
  position: absolute;
  top: 20px;
  left: 30px;
  height: 42px;
  line-height: 42px;
  /* background-color: antiquewhite; */
}
.order_body .order_body_select ul li {
  display: inline-block;
  width: 100px;
  height: 40px;
  padding: 0 10px;
  text-align: center;
  /* border: 0 solid black; */
  /* border-bottom: none; */
  background-color: #e8e8e8;
  color: black;
  cursor: pointer;
  transition: all 0.3s;
}

.order_body .order_body_select ul li:nth-child(1),
.order_body .order_body_select ul li:nth-child(2) {
  border-right: 1px solid #bababa;
}

.order_body .order_body_select .active {
  display: inline-block;
  height: 48px;
  border-radius: 12px 12px 0 0;
  transform: translateY(-8px);
  border: 1px solid #bababa;
  border-bottom: none;
  cursor: pointer;
}
.order_all {
  position: absolute;
  top: 60px;
  left: 20px;
  width: 1060px;
  height: 440px;
  /* border: 1px solid #bababa; */
  background-color: #e8e8e8;
}
.order_all_search {
  display: block;
  margin-top: 10px;
}
.search_text {
  box-sizing: border-box;
  display: inline-block;
  width: 236px;
  height: 26px;
  vertical-align: middle;
  border: 1px solid #bfbfbf;
  padding: 4px 10px;
  outline: none;
  margin: 10px 0 0 20px;
}
.search_button {
  display: inline-block;
  height: 26px;
  vertical-align: middle;
  border: 1px solid #bfbfbf;
  padding: 0 16px;
  background-color: #f5f5f5;
  border-left: none;
  box-sizing: border-box;
  margin: 10px 0 0 -4px;
  cursor: pointer;
}

.order_all_body {
  width: 980px;
  margin: 15px auto;
  /* background-color: pink; */
}

.no_message {
  float: left;
  width: 980px;
  height: 100px;
  margin: 45px auto;
  font-size: 18px;
  font-weight: 600;
  line-height: 100px;
  text-align: center;
}
.order_all_body table {
  /* display: none; */
  width: 980px;
  font-size: 16px;
  border-collapse: collapse;
}

.order_all_body table thead tr {
  /* background-color: #008c8c; */
  background-color: #a8a8a8;
  /* color: #fff; */
}

.order_all_body th {
  /* border: 1px solid #999; */
  height: 40px;
  text-align: center;
}

.order_all_body tbody tr {
  border-width: 0 1px 1px 1px;
  border-style: solid;
  border-color: #fff;
}
.order_all_body td:first-child {
  width: 580px;
  height: 60px;
  border-width: 0 1px 0 0;
  border-style: solid;
  border-color: #999;
  vertical-align: top;
  line-height: 60px;
  border-collapse: collapse;
  border-spacing: 0;
}
.order_all_body td:last-child {
  border-style: none;
}

.order_all_body td {
  height: 60px;
  border-width: 0 1px 0 0;
  border-style: solid;
  border-color: #999;
  vertical-align: top;
  text-align: center;
  line-height: 60px;
  border-collapse: collapse;
  border-spacing: 0;
}
.order_all_body .shangping-box {
  margin-left: 10px;
  width: 560px;
  height: 60px;
  text-align: center;
}

.shangping-box .shangping {
  float: left;
  width: 560px;
  height: 60px;
}

.shangping-box .shangping a {
  display: block;
  width: 560px;
  height: 50px;
  font-size: 16px;
  line-height: 50px;
  margin-top: 5px;
  text-align: left;
  overflow: hidden;
  color: black;
}

.shangping-box .shangping img {
  float: left;
  width: 60px;
  height: 50px;
  margin-right: 12px;
}
.shangping .detail {
  float: left;
  width: 460px;
  height: 40px;
  font: 14px/1.5 Microsoft Yahei, Hiragino Sans GB, Heiti SC,
    WenQuanYi Micro Hei, sans-serif !important;
  font-weight: 400;
  line-height: 50px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.order_page {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 880px;
  height: 20px;
  margin: 0 auto;
  text-align: center;
  background-color: #e8e8e8;
}

.order_page .order_page_pagelist {
  width: 20px;
  height: 20px;
  text-align: center;
  font-size: 18px;
  line-height: 20px;
  border-bottom: 1px solid #008c8c;
}

.order_page .order_page_pre,
.order_page .order_page_next {
  width: 20px;
  height: 20px;
  text-align: center;
  font-size: 18px;
  line-height: 20px;
  margin: 0 12px;
  border: none;
  border-radius: 2px;
  background-color: #a8a8a8;
  cursor: pointer;
}

.order_page .order_page_pre:hover,
.order_page .order_page_next:hover{
  background-color: #ff7f00;
}
/* 代付款状态 */
.ing-order {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    height: 420px;
    background-color: #e8e8e8;
}
/* 待收获状态 */
.ed-order {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    height: 420px;
    background-color: #e8e8e8;
}
</style>
